﻿$(document).ready(function(){  
//自动设置宽度 
   if($(document).width()>940)
          $("#container").css("width","100%");
   else
          $("#container").css("width","900px");    
    
       
    $(window).bind("resize",function(e){
           if($(document).width()>940)
                  $("#container").css("width","100%");
           else
                  $("#container").css("width","900px");      
    });
    var myvoice=setInterval('AutoScroll("#voice")',3000);
    $("#voice").bind("mouseover", function(e){clearInterval(myvoice)});
    $("#voice").bind("mouseout", function(e){myvoice=setInterval('AutoScroll("#voice")',3000);});     
    
    $(".myTable tr td").each(function(){
        $(this).bind("mouseout",function(e){$(this).parent().css("background-color","#EFF7F0")});
         $(this).bind("mouseover",function(e){$(this).parent().css("background-color","#ffffee")});
        });
    
 });
 function AutoScroll(obj){
        $(obj).find("ul:first").animate({
                marginTop:"-30px"
        },500,function(){
                $(this).css({marginTop:"0px"}).find("li:first").appendTo(this);
        });
  }

 